#!/bin/sh
PHPCENT=`ps -ef | grep php-cgi | grep 3344 | grep -v 'grep' | wc -l`
if [ $PHPCENT -lt 1 ]
then
 /usr/local/bin/php-cgi -b 3344 -c /usr/local/php/etc/php.ini &
 echo 'reboot php-cgi:3344 at ':$(date) >> /var/log/chkphp.log
fi
PHPCENTa=`ps -ef | grep php-cgi | grep 3343 | grep -v 'grep' | wc -l`
if [ $PHPCENTa -lt 1 ]
then
 /usr/local/bin/php-cgi -b 3343 -c /usr/local/php/etc/php.ini &
 echo 'reboot php-cgi:3343 at ':$(date) >> /var/log/chkphp.log
fi
